package com.ccl.iot.batch;import android.content.Context;

import com.ccl.iot.IOTInterface.IOTNameMonitorInterface.IOTNameChangeListener;
import com.ccl.iot.views.ItemView;

public abstract class BatchView extends ItemView<IOTBatch> implements IOTNameChangeListener {
	public BatchView(Context context, IOTBatch aBatch) {
		super(context, aBatch);
	}
	
	@Override
	protected void onShow() {
		IOTBatch tBatch = super.getItem();
		
		super.onShow();
		
		if (tBatch != null){
			tBatch.addNameChangeListener(this);
		}
	}

	@Override
	protected void onHide() {
		IOTBatch tBatch = super.getItem();
		
		super.onHide();
		
		if (tBatch != null){
			tBatch.removeNameChangeListener(this);
		}
	}

}
